{extend name="public:base" /}
{block name="style"}
<link rel="stylesheet" type="text/css" href="__INDEX__/css/public.css">
<link rel="stylesheet" type="text/css" href="__INDEX__/css/style.css">
<link rel="stylesheet" type="text/css" href="__INDEX__/css/responsive.css">
<link rel="shortcut icon" href="__INDEX__/images/favorite.ico">
{/block}
{block name="html"}
{include file="index@public/main" /}
<div class="right_style">
	<h3 class="title_style"><em></em><span>我的订单</span></h3>
	<div id="order">
		<!-- <div class="Order_form_filter">
			<a href="javascript:;" class="active">全部订单</a>
			<a href="javascript:;" class="">待付款</a>
			<a href="javascript:;" class="">待发货</a>
			<a href="javascript:;" class="">待收货</a>
			<a href="javascript:;" class="">待评论</a>
		</div> -->
		<div class="Tab">
			<!--全部交易-->
			<div class="Order_form_list on">
				<div class="Order_form_list_top">
					<p class="list0">商品</p>
					<p class="list1">单价</p>
					<p class="list2">数量</p>
					<p class="list3">合计</p>
					<p class="list4">操作</p>
				</div>
				<ul>
					{volist name='data' id='vo'}
					<li>
						<div class="order-index-top" name="{$vo.id}">
							<p class="l" >订单号：<span>{$vo.order_sn}</span></p>
							<p class="r" >时间：<span>{$vo.add_time|date="Y-m-d H:m",###}</span></p>
						</div>
						<div class="order-proBg_all">
							<div class="order-proBg">
								<div class="order-index">
									<div class="list0" >
										<a href="pro_detail.html">
											<img src="{$vo.goods_image}" />
											<div class="l">
												<p class="name">{$vo.goods_name}</p>
											</div>
										</a>
									</div>
									<div class="list1 price">
										<p>￥{$vo.goods_price}</p>
									</div>
									<p class="list2">X <span>{$vo.num}</span></p>
								</div>
							</div>
							<p class="list3 status">￥{$vo.amount}</p>
							<div class="list4 opeation">
								<a class="opea">{$vo.pay_name}</a>
								{if condition="$vo.pay_time eq 0"}
									{if condition="$vo.pay_id eq 3"}
										<a href="{:url('Order/proof',array('id'=>$vo.id))}" class="opea to_pay">上传凭证</a>
									{else /}
										<a href="pay.html" class="opea to_pay">去付款</a>
									{/if}

								{else /}
								<a href="javascript:;" class="opea">已付款</a>
								{/if}
								<a href="javascript:;" class="opea del">删除订单</a>
							</div>
						</div>
					</li>
					{/volist}
					<!-- <li>
						<div class="order-index-top" >
							<p class="l" >订单号：<span>4542424</span></p>
							<p class="r" >时间：<span>2018.03.09</span></p>
						</div>
						<div class="order-proBg_all">
							<div class="order-proBg">
								<div class="order-index">
									<div class="list0" >
										<a href="pro_detail.html">
											<img src="images/pro01.jpg" />
											<div class="l">
												<p class="name">女装</p>
												<p class="s">S 红色</p>
											</div>

										</a>
									</div>
									<div class="list1 price">
										<p>￥123</p>
									</div>
									<p class="list2">X <span>1</span></p>
								</div>
							</div>
							<p class="list3 status"><span class="total">￥123</span></p>
							<div class="list4 opeation">
								<a href="order_detail.html" class="opea">订单详情</a>
								<a href="javascript:;" class="opea to_fahuo">待发货</a>
								<a class="opea del">删除订单</a>
							</div>
						</div>
					</li> -->
				</ul>
			</div>

			<!--没有记录时显示-->
            <div class="no_record" style="display:none;width: 200px;text-align: center;margin: 0 auto;margin-top: 100px;">
                <img src="images/kong.png" style="width: 100px;"/>
                <p style="text-align: center;color: #555;font-size: 14px;">暂无地址，请添加地址</p>
            </div>
		</div>
	</div>
</div>

{/block}

{block name="javascript"}
<script src="__INDEX__/js/jquery-1.9.1.min.js"></script>
<script src="__INDEX__/js/public.js"></script>
<script src="__INDEX__/layer/layer.js"></script>

<script>
			
	if($(".Order_form_list.on").find("li").length<=0){
		$(".no_record").show();
  	}else{
  		$(".no_record").hide();
  	}
  
</script>
<script>
    $('ul .order-index-top').on("click",function(){
        var order_id = $(this).attr('name');
        window.location.href = '/index/Order/detail/id/'+order_id;
    });
</script>

{/block}